<template>
    <div class="div">
      <el-form :inline="true" :model="formInline" class="demo-form-inline">
        <el-form-item label="姓名：">
          <el-input ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">查询</el-button>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">新增</el-button>
        </el-form-item>
      </el-form>
      <el-table
      ref="multipleTable"
      :data="tableData"
      tooltip-effect="dark"
      style="width: 100%"
      @selection-change="handleSelectionChange">
      <el-table-column
        type="selection"
        width="25"  
        >
      </el-table-column>
      <el-table-column
        
        label="全选"
        >
      </el-table-column>
     
      <el-table-column
        prop="name"
        label="收件人"
        >
      </el-table-column>
      <el-table-column
        prop="address"
        label="详细地址"
       >
      </el-table-column>
      <el-table-column
        prop="jiancheng"
        label="简称"
       >
       
      </el-table-column>
                  
     
      <el-table-column
        prop="email"
        label="邮编"
       >
       
      </el-table-column>
      <el-table-column
        prop="op"
        label="操作"
       >
       
      </el-table-column>
      
    </el-table>
    </div>
  </template>
  
  <script>
  export default {
      data() {
        return {
          formInline: {
            user: '',
            region: ''
          },
          tableData:[],
          multipleSelection: []
  
        }
      },
    methods: {
      onSubmit() {
        console.log("submit!");
      },
      toggleSelection(rows) {
          if (rows) {
            rows.forEach(row => {
              this.$refs.multipleTable.toggleRowSelection(row);
            });
          } else {
            this.$refs.multipleTable.clearSelection();
          }
        },
        handleSelectionChange(val) {
          this.multipleSelection = val;
        }
      }
    
  };
  </script>
  
  <style lang="scss" scoped>
  .div{
      margin-left: 20px;
     border-radius: 10px;
     background-color: #fff;
  }
  .el-input{
      width: 600px;
   }
  .el-form-item{
      margin: 5px;
  }
  </style>